package com.zte.claa.inficombo.csa.app.model.dev;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

// cache缓存用（懒加载）
public class DevTypeModel implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String devTypeId;
	private DevTypeBase base;
	private List<DataModelBean> dmList;
	private List<CmdModelBean> cmList;
	// 逻辑资源类型的指标模型
	private List<ResIndexDataModel> resIndexDMList; 
	
	public DevTypeModel(){
		
	}

	public String getDevTypeId() {
		return devTypeId;
	}

	public void setDevTypeId(String devTypeId) {
		this.devTypeId = devTypeId;
	}

	public DevTypeBase getBase() {
		return base;
	}

	public void setBase(DevTypeBase base) {
		this.base = base;
	}

	public List<DataModelBean> getDmList() {
		return dmList;
	}

	public void setDmList(List<DataModelBean> dmList) {
		this.dmList = dmList;
	}
	
	public List<ResIndexDataModel> getResIndexDMList() {
		return resIndexDMList;
	}

	public void setResIndexDMList(List<ResIndexDataModel> resIndexDMList) {
		this.resIndexDMList = resIndexDMList;
	}

	public void addDataModelBean(DataModelBean dm) {
		if(dm == null){
			return;
		}
		if(this.dmList == null){
			this.dmList = new ArrayList<DataModelBean>();
		}
		this.dmList.remove(dm);
		this.dmList.add(dm);
	}
	
	public void removeDataModelBean(DataModelBean dm) {
		if(dm == null){
			return;
		}
		if(this.dmList == null){
			return;
		}
		this.dmList.remove(dm);
	}

	public List<CmdModelBean> getCmList() {
		return cmList;
	}

	public void setCmList(List<CmdModelBean> cmList) {
		this.cmList = cmList;
	}
	
	public void addCmdModelBean(CmdModelBean cm) {
		if(cm == null){
			return;
		}
		if(this.cmList == null){
			this.cmList = new ArrayList<CmdModelBean>();
		}
		this.cmList.remove(cm);
		this.cmList.add(cm);
	}
	
	public void removeCmdModelBean(CmdModelBean cm) {
		if(cm == null){
			return;
		}
		if(this.cmList == null){
			return;
		}
		this.cmList.remove(cm);
	}
	
	// ResIndexDataModel> resIndexDMList
	
	public void addResIndexDataModel(ResIndexDataModel dm) {
		if(dm == null){
			return;
		}
		if(this.resIndexDMList == null){
			this.resIndexDMList = new ArrayList<ResIndexDataModel>();
		}
		this.resIndexDMList.remove(dm);
		this.resIndexDMList.add(dm);
	}
	
	public void removeResIndexDataModel(ResIndexDataModel dm) {
		if(dm == null){
			return;
		}
		if(this.resIndexDMList == null){
			return;
		}
		this.resIndexDMList.remove(dm);
	}
}
